﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace Contracts
{
    [DataContract]
    public class Contact
    {
        // Fixed
        [DataMember]
        public string Mail { get; set; }
        // Non user settable, but may change over the time (initiated by the contact)
        [DataMember]
        public string Nickname { get; set; }
        [DataMember]
        public int StatusInt { get; set; }
        [DataMember]
        public Status Status
        {
            get
            {
                return (Status) Enum.ToObject(typeof (Status), this.StatusInt);
            }
            set
            {
                this.StatusInt = (int)value;
            }
        }
        // User settable
        [DataMember]
        public string Alias { get; set; }
        [DataMember]
        public bool Blocked { get; set; }
        [DataMember]
        public string Group { get; set; }
    }
}
